package org.jeecg.jxc.base.supplier.controller;

import org.jeecg.jxc.base.supplier.entity.ServiceVO;
import org.jeecg.jxc.base.supplier.service.SaleListGoodsService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Description: 销售单控制器
 * @author: 咕咚
 * @date: 2022.04.28 16:28
 * 项目名称：jeecg-boot-parent
 * 版本号：1.0
 */
@RestController
@RequestMapping("/saleListGoods")
public class SellListGoodsController {

    @Resource
    private SaleListGoodsService saleListGoodsService;

    //销售单查询(查询条件，销售单号，客户状态，付款状态)
    @GetMapping("/list")
    public ResponseEntity<Map<String,Object>> goodsList(@RequestParam(value = "saleNumber",required = false)String saleNumber,
                                                        @RequestParam(value = "customerId",required = false)Integer customerId,
                                                        @RequestParam(value = "state",required = false)Integer state){

        Map<String, Object> map = saleListGoodsService.selectgoodsList(saleNumber, customerId, state);
        return ResponseEntity.ok(map);

    }

}
